//
//  THNetFileUploadDownHelper.h
//  THBaseApp
//
//  Created by TryHone on 16/6/3.
//  Copyright © 2016年 TryHone. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JFFileRequestVo.h"
#import "JFResultVo.h"


typedef void(^JFFileUploadDownProgress)(double,double); //current total
typedef void(^JFFileUploadDownFail)(JFResultVo*); //把文件下载对象传出来
typedef void(^JFFileUploadDownSuccess)(JFResultVo*);

@interface JFNetFileUploadDownHelper : NSObject

//实例方法
-(void)requestWithFileRequestVo:(JFFileRequestVo*)requestVo progress:(JFFileUploadDownProgress)progress fail:(JFFileUploadDownFail)fail success:(JFFileUploadDownSuccess)success;
//取消所有的请求
-(void)cancelAllRequest;
//取消一个请求
-(void)cancelOneRequest:(JFFileRequestVo*)requestVo;

//暂停所有请求
-(void)suspendAllRequest;
//暂停一个请求
-(void)suspendOneRequest:(JFFileRequestVo*)requestVo;

//重启所有请求
-(void)reStartAllRequest;
//重启一个请求
-(void)reStartOneRequest:(JFFileRequestVo*)requestVo;




//类方法
+(void)requestWithFileRequestVo:(JFFileRequestVo*)requestVo progress:(JFFileUploadDownProgress)progress fail:(JFFileUploadDownFail)fail success:(JFFileUploadDownSuccess)success;
+(void)cancelAllRequest;
+(void)cancelOneRequest:(JFFileRequestVo*)requestVo;
//暂停所有请求
+(void)suspendAllRequest;
//暂停一个请求
+(void)suspendOneRequest:(JFFileRequestVo*)requestVo;
//重启所有请求
+(void)reStartAllRequest;
//重启一个请求
+(void)reStartOneRequest:(JFFileRequestVo*)requestVo;





@end
